//
//  JPSearchTextField.swift
//  JPWeibo
//
//  Created by 哇咔咔 on 16/9/20.
//  Copyright © 2016年 jp. All rights reserved.
//

import UIKit

//实时看到xib设置后的结果
@IBDesignable

class JPSearchTextField: UITextField {

    
    @IBInspectable var borderWidth: CGFloat = 0 {
        didSet {
            self.layer.borderWidth = borderWidth
        }
    }
    
    @IBInspectable var borderColor: UIColor? {
        didSet {
            self.layer.borderColor = borderColor?.cgColor
        }
    }
    
    @IBInspectable var cornerRadius: CGFloat = 0 {
        didSet {
            self.layer.cornerRadius = cornerRadius
        }
    }
    
    required init?(coder aDecoder: NSCoder) {
        super.init(coder: aDecoder)
        
        self.layer.masksToBounds = true
    }

}
